
.nav.navbar-default.navbar-static-side role="navigation"
  .sidebar-collapse
    ul.sidebar-menu
      li.header
      -if can? :manage, "首页"
        <li><a href="/"><i class="fa fa-dashboard"></i> <span>首页</span></a></li>
      -if can? :manage, "客户管理"
        li.treeview class="#{@mainmenu == :customer ? 'active' : ''}"
          a href = "#"
            i.fa.fa-address-card
            span.nav-label 客户管理
            span.pull-right-container
              i.fa.fa-angle-left.pull-right
          ul.treeview-menu
            li class="#{@submenu == :customer_lev ? 'active' : ''}"
              a href = "/customer_levels/index" 
                i.fa.fa-circle-o 客户级别
            li class="#{@submenu == :customer_list ? 'active' : ''}"
              a href = "/customers/index" 
                i.fa.fa-circle-o 客户档案
            li class="#{@submenu == :member_list ? 'active' : ''}"
              a href = "/member_cards" 
                i.fa.fa-circle-o 会员管理
            li class="#{@submenu == :customer_review ? 'active' : ''}"
              a href = "/customer_reviews" 
                i.fa.fa-circle-o 客户回访任务
    
      -if can? :manage, "配件管理"
        li.treeview class="#{@mainmenu == :part ? 'active' : ''}"
          a href = "#"
            i.fa.fa-puzzle-piece
            span.nav-label 配件管理
            span.pull-right-container
              i.fa.fa-angle-left.pull-right
          ul.treeview-menu
            li class="#{@submenu == :part_style ? 'active' : ''}"
              a href = "/part_styles" 
                i.fa.fa-circle-o 配件管理
            li class="#{@submenu == :part_purchase ? 'active' : ''}"
              a href = "/part_purchases" 
                i.fa.fa-circle-o 配件采购单
            li class="#{@submenu == :part_salse ? 'active' : ''}"
              a href = "/part_salses" 
                i.fa.fa-circle-o 配件零售单
            li class="#{@submenu == :part_stockin ? 'active' : ''}"
              a href = "/part_stockins" 
                i.fa.fa-circle-o 配件入库单
            li class="#{@submenu == :part_stockout ? 'active' : ''}"
              a href = "/part_stockouts" 
                i.fa.fa-circle-o 配件出库单
            li class="#{@submenu == :inventory ? 'active' : ''}"
              a href = "/inventory/index" 
                i.fa.fa-circle-o 配件库存查询

      -if can? :manage, "来往单位管理"
        li.treeview class="#{@mainmenu == :intercourse ? 'active' : ''}"
          a href = "#"
            i.fa.fa-american-sign-language-interpreting
            span.nav-label 来往单位管理
            span.pull-right-container
              i.fa.fa-angle-left.pull-right
          ul.treeview-menu
            li class="#{@submenu == :insurer_list ? 'active' : ''}"
              a href = "/insurers" 
                i.fa.fa-circle-o 保险公司
            li class="#{@submenu == :supplier_list ? 'active' : ''}"
              a href = "/suppliers" 
                i.fa.fa-circle-o 供应商

      -if can? :manage, "基础数据管理"
        li.treeview class="#{@mainmenu == :base_data ? 'active' : ''}"
          a href = "#"
            i.fa.fa-cubes
            span.nav-label 基础数据管理
            span.pull-right-container
              i.fa.fa-angle-left.pull-right
          ul.treeview-menu
            li class="#{@submenu == :maintain_style ? 'active' : ''}"
              a href = "/maintain_styles" 
                i.fa.fa-circle-o 维修项目管理
            li class="#{@submenu == :beauty_item ? 'active' : ''}"
              a href = "/beauty_items" 
                i.fa.fa-circle-o 美容项目管理
            li class="#{@submenu == :car_brand ? 'active' : ''}"
              a href = "/car_brands" 
                i.fa.fa-circle-o 车型管理
            li class="#{@submenu == :payment_method ? 'active' : ''}"
              a href = "/payment_methods" 
                i.fa.fa-circle-o 付款方式
            li class="#{@submenu == :package ? 'active' : ''}"
              a href = "/packages" 
                i.fa.fa-circle-o 套餐管理
    
      -if can? :manage, "工单管理"
        li.treeview class="#{@mainmenu == :order ? 'active' : ''}"
          a href = "#"
            i.fa.fa-file-text
            span.nav-label 工单管理
            span.pull-right-container
              i.fa.fa-angle-left.pull-right
          ul.treeview-menu
            li class="#{@submenu == :order_maintain ? 'active' : ''}"
              a href = "/order_maintains" 
                i.fa.fa-circle-o 维修工单
            li class="#{@submenu == :order_beauty ? 'active' : ''}"
              a href = "/order_beauties" 
                i.fa.fa-circle-o 美容工单
      
      -if can? :manage, "服务管理"
        li.treeview class="#{@mainmenu == :service ? 'active' : ''}"
          a href = "#"
            i.fa.fa-telegram
            span.nav-label 服务管理
            span.pull-right-container
              i.fa.fa-angle-left.pull-right
          ul.treeview-menu
            li class="#{@submenu == :service_maintain ? 'active' : ''}"
              a href = "/service/maintain" 
                i.fa.fa-circle-o 维修服务
            li class="#{@submenu == :service_beauty ? 'active' : ''}"
              a href = "/service/beauty" 
                i.fa.fa-circle-o 美容服务
   
      -if can? :manage, "财务管理"
        li.treeview class="#{@mainmenu == :finance ? 'active' : ''}"
          a href = "#"
            i.fa.fa-money
            span.nav-label 财务管理
            span.pull-right-container
              i.fa.fa-angle-left.pull-right
          ul.treeview-menu
            li class="#{@submenu == :purchase_payment ? 'active' : ''}"
              a href = "/finance/purchase_payment" 
                i.fa.fa-circle-o 配件采购结算
            li class="#{@submenu == :salse_payment ? 'active' : ''}"
              a href = "/finance/salse_payment" 
                i.fa.fa-circle-o 配件零售结算
            li class="#{@submenu == :maintain_payment ? 'active' : ''}"
              a href = "/finance/maintain_payment" 
                i.fa.fa-circle-o 维修结算
            li class="#{@submenu == :beauty_payment ? 'active' : ''}"
              a href = "/finance/beauty_payment" 
                i.fa.fa-circle-o 美容结算
    
      -if can? :manage, "统计分析"
        li.treeview class="#{@mainmenu == :analize ? 'active' : ''}"
          a href = "#"
            i.fa.fa-area-chart
            span.nav-label 统计分析
            span.pull-right-container
              i.fa.fa-angle-left.pull-right
          ul.treeview-menu
            li class="#{@submenu == :maintain_income ? 'active' : ''}"
              a href = "/analize/maintain_income" 
                i.fa.fa-circle-o 维修收入日明细
            li class="#{@submenu == :business_total ? 'active' : ''}"
              a href = "/analize/business_total" 
                i.fa.fa-circle-o 营业综合统计
            li class="#{@submenu == :business_income ? 'active' : ''}"
              a href = "/analize/business_income" 
                i.fa.fa-circle-o 营业收入明细
            li class="#{@submenu == :stockin_stockout ? 'active' : ''}"
              a href = "/analize/stockin_stockout" 
                i.fa.fa-circle-o 出入库明细统计
            li class="#{@submenu == :part_salse ? 'active' : ''}"
              a href = "/analize/part_salse" 
                i.fa.fa-circle-o 配件销售统计
  
            li class="#{@submenu == :staff_achievement ? 'active' : ''}"
              a href = "/analize/staff_achievement" 
                i.fa.fa-circle-o 员工绩效统计
    
      -if can? :manage, "人员管理"
        li.treeview class="#{@mainmenu == :people ? 'active' : ''}"
          a href = "#"
            i.fa.fa-users
            span.nav-label 人员管理
            span.pull-right-container
              i.fa.fa-angle-left.pull-right
          ul.treeview-menu
            li class="#{@submenu == :staff_list ? 'active' : ''}"
              a href = "/staffs" 
                i.fa.fa-circle-o 员工管理
            li class="#{@submenu == :user_list ? 'active' : ''}"
              a href = "/users/index" 
                i.fa.fa-circle-o 用户管理
            li class="#{@submenu == :role_list ? 'active' : ''}"
              a href = "/roles" 
                i.fa.fa-circle-o 角色管理